package com.fc.test.model.auto;

import cn.hutool.core.util.StrUtil;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * 票据表 PaperSheetExample
 * @author 谢志恺_自动生成
 * @email 2251719256@qq.com
 * @date 2020-10-28 13:29:36
 */
public class PaperSheetExample {

    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public PaperSheetExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }
				
        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(Integer value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(Integer value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }
        
			
        public Criteria andSpectatorIsNull() {
            addCriterion("spectator is null");
            return (Criteria) this;
        }

        public Criteria andSpectatorIsNotNull() {
            addCriterion("spectator is not null");
            return (Criteria) this;
        }

        public Criteria andSpectatorEqualTo(String value) {
            addCriterion("spectator =", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorNotEqualTo(String value) {
            addCriterion("spectator <>", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorGreaterThan(String value) {
            addCriterion("spectator >", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorGreaterThanOrEqualTo(String value) {
            addCriterion("spectator >=", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorLessThan(String value) {
            addCriterion("spectator <", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorLessThanOrEqualTo(String value) {
            addCriterion("spectator <=", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorLike(String value) {
            addCriterion("spectator like", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorNotLike(String value) {
            addCriterion("spectator not like", value, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorIn(List<String> values) {
            addCriterion("spectator in", values, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorNotIn(List<String> values) {
            addCriterion("spectator not in", values, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorBetween(String value1, String value2) {
            addCriterion("spectator between", value1, value2, "spectator");
            return (Criteria) this;
        }

        public Criteria andSpectatorNotBetween(String value1, String value2) {
            addCriterion("spectator not between", value1, value2, "spectator");
            return (Criteria) this;
        }
        
			
        public Criteria andPohoneIsNull() {
            addCriterion("pohone is null");
            return (Criteria) this;
        }

        public Criteria andPohoneIsNotNull() {
            addCriterion("pohone is not null");
            return (Criteria) this;
        }

        public Criteria andPohoneEqualTo(String value) {
            addCriterion("pohone =", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneNotEqualTo(String value) {
            addCriterion("pohone <>", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneGreaterThan(String value) {
            addCriterion("pohone >", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneGreaterThanOrEqualTo(String value) {
            addCriterion("pohone >=", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneLessThan(String value) {
            addCriterion("pohone <", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneLessThanOrEqualTo(String value) {
            addCriterion("pohone <=", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneLike(String value) {
            addCriterion("pohone like", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneNotLike(String value) {
            addCriterion("pohone not like", value, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneIn(List<String> values) {
            addCriterion("pohone in", values, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneNotIn(List<String> values) {
            addCriterion("pohone not in", values, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneBetween(String value1, String value2) {
            addCriterion("pohone between", value1, value2, "pohone");
            return (Criteria) this;
        }

        public Criteria andPohoneNotBetween(String value1, String value2) {
            addCriterion("pohone not between", value1, value2, "pohone");
            return (Criteria) this;
        }
        
			
        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(String value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(String value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(String value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(String value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(String value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(String value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLike(String value) {
            addCriterion("type like", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotLike(String value) {
            addCriterion("type not like", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<String> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<String> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(String value1, String value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(String value1, String value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }
        
			
        public Criteria andNumberIsNull() {
            addCriterion("number is null");
            return (Criteria) this;
        }

        public Criteria andNumberIsNotNull() {
            addCriterion("number is not null");
            return (Criteria) this;
        }

        public Criteria andNumberEqualTo(Integer value) {
            addCriterion("number =", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotEqualTo(Integer value) {
            addCriterion("number <>", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThan(Integer value) {
            addCriterion("number >", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("number >=", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLessThan(Integer value) {
            addCriterion("number <", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLessThanOrEqualTo(Integer value) {
            addCriterion("number <=", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberLike(Integer value) {
            addCriterion("number like", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotLike(Integer value) {
            addCriterion("number not like", value, "number");
            return (Criteria) this;
        }

        public Criteria andNumberIn(List<Integer> values) {
            addCriterion("number in", values, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotIn(List<Integer> values) {
            addCriterion("number not in", values, "number");
            return (Criteria) this;
        }

        public Criteria andNumberBetween(Integer value1, Integer value2) {
            addCriterion("number between", value1, value2, "number");
            return (Criteria) this;
        }

        public Criteria andNumberNotBetween(Integer value1, Integer value2) {
            addCriterion("number not between", value1, value2, "number");
            return (Criteria) this;
        }
        
			
        public Criteria andFailureTimeIsNull() {
            addCriterion("failureTime is null");
            return (Criteria) this;
        }

        public Criteria andFailureTimeIsNotNull() {
            addCriterion("failureTime is not null");
            return (Criteria) this;
        }

        public Criteria andFailureTimeEqualTo(Date value) {
            addCriterion("failureTime =", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeNotEqualTo(Date value) {
            addCriterion("failureTime <>", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeGreaterThan(Date value) {
            addCriterion("failureTime >", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("failureTime >=", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeLessThan(Date value) {
            addCriterion("failureTime <", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeLessThanOrEqualTo(Date value) {
            addCriterion("failureTime <=", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeLike(Date value) {
            addCriterion("failureTime like", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeNotLike(Date value) {
            addCriterion("failureTime not like", value, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeIn(List<Date> values) {
            addCriterion("failureTime in", values, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeNotIn(List<Date> values) {
            addCriterion("failureTime not in", values, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeBetween(Date value1, Date value2) {
            addCriterion("failureTime between", value1, value2, "failureTime");
            return (Criteria) this;
        }

        public Criteria andFailureTimeNotBetween(Date value1, Date value2) {
            addCriterion("failureTime not between", value1, value2, "failureTime");
            return (Criteria) this;
        }
        
			
        public Criteria andCreationTimeIsNull() {
            addCriterion("creationTime is null");
            return (Criteria) this;
        }

        public Criteria andCreationTimeIsNotNull() {
            addCriterion("creationTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreationTimeEqualTo(Date value) {
            addCriterion("creationTime =", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeNotEqualTo(Date value) {
            addCriterion("creationTime <>", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeGreaterThan(Date value) {
            addCriterion("creationTime >", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("creationTime >=", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeLessThan(Date value) {
            addCriterion("creationTime <", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeLessThanOrEqualTo(Date value) {
            addCriterion("creationTime <=", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeLike(Date value) {
            addCriterion("creationTime like", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeNotLike(Date value) {
            addCriterion("creationTime not like", value, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeIn(List<Date> values) {
            addCriterion("creationTime in", values, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeNotIn(List<Date> values) {
            addCriterion("creationTime not in", values, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeBetween(Date value1, Date value2) {
            addCriterion("creationTime between", value1, value2, "creationTime");
            return (Criteria) this;
        }

        public Criteria andCreationTimeNotBetween(Date value1, Date value2) {
            addCriterion("creationTime not between", value1, value2, "creationTime");
            return (Criteria) this;
        }
        
			
        public Criteria andOperatorIsNull() {
            addCriterion("operator is null");
            return (Criteria) this;
        }

        public Criteria andOperatorIsNotNull() {
            addCriterion("operator is not null");
            return (Criteria) this;
        }

        public Criteria andOperatorEqualTo(String value) {
            addCriterion("operator =", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotEqualTo(String value) {
            addCriterion("operator <>", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorGreaterThan(String value) {
            addCriterion("operator >", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorGreaterThanOrEqualTo(String value) {
            addCriterion("operator >=", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorLessThan(String value) {
            addCriterion("operator <", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorLessThanOrEqualTo(String value) {
            addCriterion("operator <=", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorLike(String value) {
            addCriterion("operator like", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotLike(String value) {
            addCriterion("operator not like", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorIn(List<String> values) {
            addCriterion("operator in", values, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotIn(List<String> values) {
            addCriterion("operator not in", values, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorBetween(String value1, String value2) {
            addCriterion("operator between", value1, value2, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotBetween(String value1, String value2) {
            addCriterion("operator not between", value1, value2, "operator");
            return (Criteria) this;
        }
        
			
        public Criteria andRemarkIsNull() {
            addCriterion("remark is null");
            return (Criteria) this;
        }

        public Criteria andRemarkIsNotNull() {
            addCriterion("remark is not null");
            return (Criteria) this;
        }

        public Criteria andRemarkEqualTo(String value) {
            addCriterion("remark =", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkNotEqualTo(String value) {
            addCriterion("remark <>", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkGreaterThan(String value) {
            addCriterion("remark >", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkGreaterThanOrEqualTo(String value) {
            addCriterion("remark >=", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkLessThan(String value) {
            addCriterion("remark <", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkLessThanOrEqualTo(String value) {
            addCriterion("remark <=", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkLike(String value) {
            addCriterion("remark like", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkNotLike(String value) {
            addCriterion("remark not like", value, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkIn(List<String> values) {
            addCriterion("remark in", values, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkNotIn(List<String> values) {
            addCriterion("remark not in", values, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkBetween(String value1, String value2) {
            addCriterion("remark between", value1, value2, "remark");
            return (Criteria) this;
        }

        public Criteria andRemarkNotBetween(String value1, String value2) {
            addCriterion("remark not between", value1, value2, "remark");
            return (Criteria) this;
        }
        
		
		 public Criteria andLikeQuery(PaperSheet record) {
		 	List<String> list= new ArrayList<String>();
		 	List<String> list2= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
        	
        				 
			 if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			 list.add("ifnull(id,'')");
    		 }
    		 
						 
			 if(record.getSpectator()!=null&&StrUtil.isNotEmpty(record.getSpectator().toString())) {
    			 list.add("ifnull(spectator,'')");
    		 }
    		 
						 
			 if(record.getPohone()!=null&&StrUtil.isNotEmpty(record.getPohone().toString())) {
    			 list.add("ifnull(pohone,'')");
    		 }
    		 
						 
			 if(record.getType()!=null&&StrUtil.isNotEmpty(record.getType().toString())) {
    			 list.add("ifnull(type,'')");
    		 }
    		 
						 
			 if(record.getNumber()!=null&&StrUtil.isNotEmpty(record.getNumber().toString())) {
    			 list.add("ifnull(number,'')");
    		 }
    		 
						 
			 if(record.getFailureTime()!=null&&StrUtil.isNotEmpty(record.getFailureTime().toString())) {
    			 list.add("ifnull(failureTime,'')");
    		 }
    		 
						 
			 if(record.getCreationTime()!=null&&StrUtil.isNotEmpty(record.getCreationTime().toString())) {
    			 list.add("ifnull(creationTime,'')");
    		 }
    		 
						 
			 if(record.getOperator()!=null&&StrUtil.isNotEmpty(record.getOperator().toString())) {
    			 list.add("ifnull(operator,'')");
    		 }
    		 
						 
			 if(record.getRemark()!=null&&StrUtil.isNotEmpty(record.getRemark().toString())) {
    			 list.add("ifnull(remark,'')");
    		 }
    		 
									
			 if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			list2.add("'%"+record.getId()+"%'");
    		 }
        		 
						
			 if(record.getSpectator()!=null&&StrUtil.isNotEmpty(record.getSpectator().toString())) {
    			list2.add("'%"+record.getSpectator()+"%'");
    		 }
        		 
						
			 if(record.getPohone()!=null&&StrUtil.isNotEmpty(record.getPohone().toString())) {
    			list2.add("'%"+record.getPohone()+"%'");
    		 }
        		 
						
			 if(record.getType()!=null&&StrUtil.isNotEmpty(record.getType().toString())) {
    			list2.add("'%"+record.getType()+"%'");
    		 }
        		 
						
			 if(record.getNumber()!=null&&StrUtil.isNotEmpty(record.getNumber().toString())) {
    			list2.add("'%"+record.getNumber()+"%'");
    		 }
        		 
						
			 if(record.getFailureTime()!=null&&StrUtil.isNotEmpty(record.getFailureTime().toString())) {
    			list2.add("'%"+record.getFailureTime()+"%'");
    		 }
        		 
						
			 if(record.getCreationTime()!=null&&StrUtil.isNotEmpty(record.getCreationTime().toString())) {
    			list2.add("'%"+record.getCreationTime()+"%'");
    		 }
        		 
						
			 if(record.getOperator()!=null&&StrUtil.isNotEmpty(record.getOperator().toString())) {
    			list2.add("'%"+record.getOperator()+"%'");
    		 }
        		 
						
			 if(record.getRemark()!=null&&StrUtil.isNotEmpty(record.getRemark().toString())) {
    			list2.add("'%"+record.getRemark()+"%'");
    		 }
        		 
			        	
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append(" like CONCAT(");
        	
        	
        	buffer.append(StrUtil.join(",",list2));
        	
        	buffer.append(")");
        	if(!" CONCAT() like CONCAT()".equals(buffer.toString())) {
        		addCriterion(buffer.toString());
        	}
        	return (Criteria) this;
        }
        
        public Criteria andLikeQuery2(String searchText) {
		 	List<String> list= new ArrayList<String>();
		 
        	StringBuffer buffer=new StringBuffer();
        	
        	        	
    		list.add("ifnull(id,'')");
			
			        	
    		list.add("ifnull(spectator,'')");
			
			        	
    		list.add("ifnull(pohone,'')");
			
			        	
    		list.add("ifnull(type,'')");
			
			        	
    		list.add("ifnull(number,'')");
			
			        	
    		list.add("ifnull(failureTime,'')");
			
			        	
    		list.add("ifnull(creationTime,'')");
			
			        	
    		list.add("ifnull(operator,'')");
			
			        	
    		list.add("ifnull(remark,'')");
			
						
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append("like '%");
        	buffer.append(searchText);
        	buffer.append("%'");
        	
        	addCriterion(buffer.toString());
        	
        	return (Criteria) this;
        }
        
}
	
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}